package com.qidian.util.config;

import com.qidian.util.interceptor.RequestTimeHandlerInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * Author: 戴着假发的程序员
 * Date: 2024-04-17 15:05
 * company: 起点编程
 **/

@Configuration
public class RequestTimeHandlerAutoConfiguration implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        // 配置拦截器
        registry.addInterceptor(new RequestTimeHandlerInterceptor()).addPathPatterns("/**/**");
    }
}
